<template>
	<view>
		<view class="content_realization">
			旧密码
			<input class="input" type="password" v-model="old" placeholder="请输入旧密码" />
			新密码
			<input class="input" type="password" v-model="newpassword" placeholder="请输入新密码" />
			确认密码
			<input class="input" type="password" v-model="newpassword_" placeholder="请再次输入密码" />
			<button @click="updateInfo" style="margin-top: 60rpx;height: 100rpx;line-height: 100rpx;width: 90%;"
				type="primary">确定</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				old: '',
				newpassword: '',
				newpassword_:''
			}
		},
		methods: {
			updateInfo() {
				if (this.old.length == 0) {
					uni.$u.toast('请输入原密码')
				} else if (this.newpassword.length == 0) {
					uni.$u.toast('请输入新密码')
				} else if (this.newpassword!=this.newpassword_) {
					uni.$u.toast('两次密码不一致')
				} else{
					// 验证码校检操作

					// 成功回调
					uni.$u.toast('手机号修改成功')
					// 失败回调
					uni.$u.toast('原密码错误，操作失败')
				}
			}
		}
	}
</script>

<style>
	.input {
		background-color: #f2f7fb;
		height: 60rpx;
		padding: 10rpx 30rpx;
	}

	.realization_input {
		background-color: #f2f7fb;
		height: 60rpx;
	}

	.content_realization {
		line-height: 100rpx;
		padding: 30rpx;
	}
</style>
